package com.chahua.organized.service;

import com.chahua.organized.entity.Department;
import com.chahua.organized.qo.DepartmentQo;
import com.chahua.organized.vo.DepartmentInfoVo;

import java.util.List;

/**
 * (Department)表服务接口
 *
 * @author makejava
 * @since 2022-04-09 21:31:41
 */
public interface DepartmentService {

    /**
     * 新增部门
     *
     * @param departmentQo 数据
     */
    void add(DepartmentQo departmentQo);


    /**
     * 获取部门信息
     *
     * @param id 部门id
     * @return Department
     */
    DepartmentInfoVo getById(int id);

    /**
     * 根据id更新部门
     *
     * @param id           部门id
     * @param departmentQo 数据
     */
    void updateById(int id, DepartmentQo departmentQo);

    /**
     * 删除部门
     *
     * @param id 部门id
     */
    void delete(Integer id);

    /**
     * 根据当前部门的id，获取部门树的完整路径
     *
     * @param id 部门id
     * @return 部门节点路径
     */
    List<Integer> getDepartmentPath(int id);

    /**
     * 获取部门树
     *
     * @return List<Department>
     */
    List<Department> listWithTree();

}
